package by.semerikov.converter;

import by.semerikov.entity.UserSessionEntity;
import by.semerikov.model.UserSession;

public class UserSessionConverter implements IConverter<UserSession, UserSessionEntity> {

	@Override
	public UserSessionEntity convertToEntity(UserSession model) {
		UserSessionEntity result = new UserSessionEntity();
		result.setId(model.getId());
		result.setIndex(model.getIndex());
		result.setUserId(model.getUserId());
		return result;
	}

	@Override
	public UserSession convertToModel(UserSessionEntity entity) {
		UserSession result = new UserSession();
		result.setId(entity.getId());
		result.setIndex(entity.getIndex());
		result.setUserId(entity.getUserId());
		return result;
	}
	
	

}
